<template>
  <el-form  ref="ruleFormRef" :model="formInline" :rules="formRules" label-width="auto" label-position="top" v-loading="isLoading">
    <el-row :gutter="30">

			<re-col :value='12' :xs='24' :sm='24'>
				<el-form-item :label='titles?.supUnityId' prop='supUnityId'>
					<el-input v-model.trim='formInline.supUnityId' clearable :placeholder='prompt?.supUnityId' />
				</el-form-item>
			</re-col>
			<re-col :value='12' :xs='24' :sm='24'>
				<el-form-item :label='titles?.roleNames' prop='roleNames'>
					<el-input v-model.trim='formInline.roleNames' clearable :placeholder='prompt?.roleNames' />
				</el-form-item>
			</re-col>
			<re-col :value='12' :xs='24' :sm='24'>
				<el-form-item :label='titles?.supUnityId' prop='supUnityId'>
					<el-input v-model.trim='formInline.supUnityId' clearable :placeholder='prompt?.supUnityId' />
				</el-form-item>
			</re-col>
			<re-col :value='12' :xs='24' :sm='24'>
				<el-form-item :label='titles?.roleNames' prop='roleNames'>
					<el-input v-model.trim='formInline.roleNames' clearable :placeholder='prompt?.roleNames' />
				</el-form-item>
			</re-col>    </el-row>
  </el-form>
</template>

<script setup lang="ts">
import { ref,reactive } from "vue";
import ReCol from "@/components/ReCol";
import type { FormRules } from "element-plus";
import { titles,prompt } from './index';
import type { infoType } from '@/api/manage/Individual-management/regulatory-authorization/index';
type FormProps = {
	formInline: infoType,
	isLoading: boolean
}

const props = withDefaults(defineProps<FormProps>(), {
	formInline: () => ({} as infoType),
	isLoading: false
});

const formRules = reactive(<FormRules>{supUnityId: [{ required: true, message: prompt?.supUnityId, trigger: 'blur' },],
roleNames: [{ required: true, message: prompt?.roleNames, trigger: 'blur' },],
supUnityId: [{ required: true, message: prompt?.supUnityId, trigger: 'blur' },],
roleNames: [{ required: true, message: prompt?.roleNames, trigger: 'blur' },],
});
const ruleFormRef = ref();
//    const newFormInline = ref(props.formInline as any);
//
//
//    watch(()=>props.formInline,()=>{
//    	newFormInline.value = props.formInline
//    },{
//    	deep:true,
//    	immediate:true
//    })
function getRef() {
  return ruleFormRef.value;
}

defineExpose({ getRef });
</script>
